import pygame, sys
from pygame.locals import *
from MiniShipsLib import *

eng = MSEngine((800,600),'MiniShips')
screen = eng.GetScreen()
ocean = MSScrollingBackgroud(screen, 'ocean.png')
sky =  MSScrollingBackgroud(screen ,'sky.png')
player = MSPlayer(screen, 'ship.png',400,225)

oceanSpeed = 2.5;



skySpeed = oceanSpeed / 5
while True:
    sky.Display()
    ocean.Display()
    player.Display()


    sky.Update(skySpeed)
    ocean.Update(oceanSpeed)
    player.Update(oceanSpeed)

    

    
    eng.Update(30)
    
    for event in pygame.event.get():
        if event.type == QUIT or (event.type == KEYUP and event.key == K_ESCAPE):
            pygame.quit()
            sys.exit()
